﻿import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import Home from './views/Home.vue'
import Echarts from './views/charts/Echarts.vue'
import User from './views/user/User.vue'
import Article from './views/article/article.vue'
import ArticleType from './views/article/articleType.vue'
import Course from './views/course/course.vue'
import Register from './views/Register.vue'
import Log from "./views/system/Log.vue";
import Param from "./views/blog/Param.vue";
import Password from "./views/password.vue";

let routes = [
    {
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    }
    ,
    {
        path: '/password',
        component: Password,
        name: '',
        hidden: true
    },
    {
        path: '/register',
        component: Register,
        name: '',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },
    {
        path: '/',
        component: Home,
        name: '首页',
        leaf: true,//只有一个节点
        iconCls: 'el-icon-s-home',
        children: [
            { path: '/echarts', component: Echarts, name: '首页' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '系统管理',
        iconCls: 'el-icon-monitor',//图标样式class
        children: [
            { path: '/log', component: Log, name: '操作日志' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '用户管理',
        iconCls: 'el-icon-monitor',//图标样式class
        children: [
            { path: '/user', component: User, name: '用户信息管理' },
            { path: '/course', component: Course, name: '课程信息管理' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '博客管理',
        iconCls: 'el-icon-monitor',//图标样式class
        children: [
            { path: '/article', component: Article, name: '文章管理' },
            { path: '/articleType', component: ArticleType, name: '文章类型管理' },
            { path: '/Param', component: Param, name: '参数管理' },
        ]
    },
    {
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    }
];

export default routes;
